import { Controller, UseGuards } from "@nestjs/common";
import { Crud } from "nestjs-mongoose-crud";
import { Service } from "@lib/db/models/service.model";
import { InjectModel } from "nestjs-typegoose";
import { ModelType } from "@typegoose/typegoose/lib/types";
import { ApiUseTags, ApiBearerAuth } from "@nestjs/swagger";
import { AuthGuard } from "@nestjs/passport";

@Controller('services')
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
@Crud({
  model: Service
})
@ApiUseTags('商品服务')
export class ServicesController {
  constructor(
    @InjectModel(Service) private readonly  model: ModelType<Service>
  ){}
}